package com.star.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.star.model.UserModel;

public interface UserDao {

	@Insert("insert into t_user (username,psw,flag,gmt_create,gmt_modified) values (#{userName},#{psw},#{flag},now(),now())")
	public void insertUser(UserModel user);

	@Select("select * from t_user where userName = #{userName}")
	public UserModel selectUser(@Param("userName") String userName);
	
	
	@Select("select * from t_user where id = #{id}")
	public UserModel selectUserById(@Param("id") Integer id);
}
